<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ page
	import="com.onlineMIS.common.Common_util,java.util.Date,java.text.SimpleDateFormat"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>禧乐仓连锁店管理信息系统</title>
<%@ include file="../../../common/Style.jsp"%>

<script>

$(document).ready(function(){
	parent.$.messager.progress('close'); 

	var params = $.serializeObject($('#preGenReportForm'));
	
	$('#dataGridSup').datagrid({
		url : 'financeSupplierJSON!generateFinanceRpt',
		queryParams: params,
		fit : true,
		fitColumns : false,
		pagination : false,
		border : false,
		checkOnSelect : false,
		selectOnCheck : false,
		singleSelect:true,
		showFooter:true,
		rownumbers:true,
		nowrap : false,
		frozenColumns :[[					
			                {field:'supplierName', width:140,title:'供应商名字',fixed:true}
			           ]],
		columns : [ [

					{field:'itemName', width:70,title:'银行卡',
						formatter: function (value, row, index){
							return row.itemName;
						}},
					{field:'payValue', width:70,title:'付款',
							formatter: function (value, row, index){
								return row.payValue;
							}},
					{field:'receiptValue', width:70,title:'收款',
								formatter: function (value, row, index){
									return row.receiptValue;
								}}	
					
		]],
		toolbar : '#toolbarSup',
	});
});

function generateReport(){
	var params = $.serializeObject($('#preGenReportForm')); 
	$('#dataGridSup').datagrid('load',params); 
}
</script>
</head>
<body>
	<div class="easyui-layout" data-options="fit : true,border : false">
		<div data-options="region:'north',border:false" style="height: 125px;">
			<s:form id="preGenReportForm" action="" theme="simple" method="POST">
				<table width="98%" align="center" class="OuterTable">
					<tr>
						<td>
							<table width="100%" border="0">
								<tr>
									<td height="50" colspan="7">
										<div class="errorAndmes">
											<s:actionerror cssStyle="color:red" />
											<s:actionmessage cssStyle="color:blue" />
										</div>
										<table width="100%" border="0">
											<tr class="PBAOuterTableTitale">
												<td height="35" colspan="3">总部采购统计报表</td>
											</tr>
											<tr>
												<td width="20%"><%@ include file="../SupplierInput.jsp"%></td>
												<td width="6%"><strong>财务单据日期：</strong></td>
												<td><s:textfield id="startDate"
														name="formBean.searchStartTime" cssClass="easyui-datebox"
														data-options="width:100,editable:false" /> &nbsp; 至&nbsp;
													<s:textfield id="endDate" name="formBean.searchEndTime"
														cssClass="easyui-datebox"
														data-options="width:100,editable:false" /></td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</s:form>
		</div>
		<div data-options="region:'center',border:false">
			<table id="dataGridSup" border="0">
			</table>
			<div id="toolbarSup" style="display: none;">
				<a onclick="generateReport();" href="javascript:void(0);"
					class="easyui-linkbutton"
					data-options="iconCls:'icon-search',plain:true">查询报表</a>
			</div>
		</div>
	</div>
</body>
</html>